package com.xbongbong.paas.pojo.workflow.nodes.vo;

import com.xbongbong.paas.pojo.workflow.settings.vo.FilterConditionVO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @author 吴峰
 * @version 1.0
 * @date 2021/5/20 11:05
 * @description 获取单条数据节点
 */
@Getter
@Setter
@ToString
public class ObtainSingleDataNodeVO implements Serializable {

    private static final long serialVersionUID = -7154112408496961993L;
    /**
     * 数据来源 1：从工作表获取
     */
    private Integer dataSources;

    /**
     * 过滤条件
     */
    private List<FilterConditionVO> filterCondition;
    /**
     * 排序字段
     */
    private String orderField;

    private String orderFieldName;
    /**
     * 排序顺序
     */
    private String order;

    /**
     * 无数据执行的事件 1：继续执行；2：中止流程
     */
    private Integer noDataEvent;
    /**
     * 触发表单的数据来源是编辑前还是编辑后；编辑前：0；编辑后：1
     */
    private Integer editedData;

    public ObtainSingleDataNodeVO() {
    }

    public ObtainSingleDataNodeVO(Integer editedData, Integer dataSources, List<FilterConditionVO> filterCondition, String orderField, String orderFieldName, String order, Integer noDataEvent) {
        this.editedData = editedData;
        this.dataSources = dataSources;
        this.filterCondition = filterCondition;
        this.orderField = orderField;
        this.orderFieldName = orderFieldName;
        this.order = order;
        this.noDataEvent = noDataEvent;
    }
}
